/*
 *  VShader.h
 *  RTR
 *
 *  Created by Bernardo Franceschin on 4/21/11.
 *
 */

#ifndef VSHADER_H
#define VSHADER_H

#define VPOS 0
#define VNORMAL 1
#define VTEX 2
#define VTANGENT 3

#include"glheader.h"

class VShader {
  GLuint v_id;
  GLuint f_id;
  GLuint g_id;
  GLuint p_id;
  public:
  VShader (): g_id(-1){};
  bool SetVertSource (const char ** src, int n);
  bool SetFragSource (const char ** src, int n);
  bool SetGeometrySource (const char ** src, int n);
  bool SetVertFile (char * filename);
  bool SetFragFile (char * filename);
  bool SetGeometryFile (char * filename);
  bool CreateProgram ();
  void SetAsCurrent ();
  unsigned int GetUniformId(const char * name);
  GLuint GetPid (); 
};

#endif
